<ul id="cghul" class="mode-group-title">
  <!--<li><a href="#" onclick="redirect(1)">群组首页</a></li>
  <li><a href="#" onclick="redirect(2)">讨论区</a></li>
  <li><a href="#" onclick="redirect(3)">相册</a></li>
  <li><a href="#" onclick="redirect(4)">成员</a></li>
  <if condition="$ifAdmin eq 1"><li><a href="#" onclick="redirect(5)">文章管理</a></li></if>
  <if condition="$ifAdmin eq 1"><li><a href="#" onclick="redirect(6)">群组管理</a></li></if>-->
  <li><a href="/bbs/group_{$cyid}.html" >群组首页</a></li>
  <li><a href="/bbs/write_{$cyid}.html" >讨论区</a></li>
  <li><a href="/bbs/album_{$cyid}.html" >相册</a></li>
  <li><a href="/bbs/member_{$cyid}.html" >成员</a></li>
  <if condition="$ifAdmin eq 1"><li><a href="/main/public.php/circle/articleManage/cyid/{$cyid}/listyle/5">文章管理</a></li></if>
  <if condition="$ifAdmin eq 1"><li><a href="/pw8/apps.php?q=group&a=set&cyid={$cyid}&listyle=6" >群组管理</a></li></if>
</ul>
<div style="clear:left;"></div>

<script>
  var cyid = "{$cyid}";
  var listyle = "{$listyle}";
  $("#cghul li:nth-child("+listyle+")").addClass("cuerrt");
  /*  不知道为什么写cookie的时候出现问题，总是延迟一下*/
  function redirect(index){
    var urls = {
      1: "/pw8/apps.php?q=group&cyid="+cyid+"/listyle/1",
      2: "/pw8/apps.php?q=group&a=write&cyid="+cyid+"&listyle=2",
      3: "/pw8/apps.php?q=galbum&cyid="+cyid+"&listyle=3",
      4: "/pw8/apps.php?q=group&a=member&cyid="+cyid+"&listyle=4",
      5: "/main/public.php/circle/articleManage/cyid/"+cyid+"/listyle/5",
      6: "/pw8/apps.php?q=group&a=set&cyid="+cyid+"&listyle=6"
    };
    window.location.href = urls[index];
  }
</script>
